package com.ukao.cashregister.adapter;

import android.content.Context;

import com.mcxtzhang.commonadapter.rv.CommonAdapter;
import com.mcxtzhang.commonadapter.rv.ViewHolder;
import com.ukao.cashregister.R;
import com.ukao.cashregister.bean.PrinterBean;
import com.ukao.cashregister.widget.SwitchButton;

import java.util.List;

/**
 * Created by ukaodev on 2017/6/14.
 */

public class PrintAdapter extends CommonAdapter<PrinterBean> {



    public PrintAdapter(Context context, List<PrinterBean> datas ) {
        super(context, datas, R.layout.adapte_setting_spearr);
    }




    @Override
    public void convert(ViewHolder holder, PrinterBean item) {
        holder.setText(R.id.name,item.getPrinterName());
        holder.setText(R.id.device_name,item.getPrinterDevice());
        SwitchButton switchBtn=holder.getView(R.id.switch_btn);
//        if(item.isWash()){
//            if (SaveParamets.getWashPrinState()){
//                switchBtn.openSwitch();
//            }else{
//                switchBtn.closeSwitch();
//            }
//
//
//        }else{
//            if (SaveParamets.getTagPrinState()){
//                switchBtn.openSwitch();
//            }else{
//                switchBtn.closeSwitch();
//            }
//
//
//        }
    }


}
